
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<c:set var="listorders" scope="request"
	value="${requestScope.listorderdetail}" />
<c:choose>
	<c:when test="${listorderdetail.size() > 0}">
		<form name="listorder" action="UpdateOrderUser.do" method="get">
			<table width="100%" border="1" cellspacing="0" cellpadding="5">
				<tr bgcolor="#666666">
					<td class="bgColorMain"><strong><font color="#FFFFFF">LIST
								ORDER DETAIL AT ORDERID = ${requestScope.orderid }</font></strong></td>
				</tr>
				<tr>
					<td>
						<table width="100%" border="1" cellspacing="0" cellpadding="5">
							<tr align="center" bgcolor="#999999">
								<td ><strong>ORDERDETAIL ID</strong></td>
								<td ><strong>PRODUCT NAME</strong></td>
								<td><strong>PRICE</strong></td>
								<td><strong>QUANTITY</strong></td>
								<td ><strong>TAX</strong></td>
								<td ><strong>TOTAL MONEY</strong></td>
							</tr>
							<c:if test="${listorderdetail.size() > 0}">
								<c:forEach var="i" begin="0" end="${listorderdetail.size()-1}">
									<c:set var="orderde" value="${listorderdetail[i]}" />
									<tr valign="top">
										<td align="center">${orderde.orderdetailid }</td>
										<td align="center">${orderde.products.productname }</td>
										<td align="center">${orderde.products.price}$</td>
										<td align="center">${orderde.quantity}</td>
										<td align="center">${orderde.quantity*orderde.products.price*orderde.products.tax/100}$</td>
										<td align="center">${orderde.quantity*orderde.products.price + orderde.quantity*orderde.products.price*orderde.products.tax/100}$</td>
									</tr>
								</c:forEach>
							</c:if>
						</table> <br />
						<table width="100%">
							<tr valign="top">
								<td align="center"><a href="OrderManage.do"><img
										src="images/backbt.png" alt="#" border="0" /></a></td>	
							</tr>
						</table>
						<table width="100%">
							<tr valign="top">
								<td align="center"><a href="DownloadOrderDetail.do?orderid=${orderid }"><img
										src="images/btDownload.png" alt="#" border="0" /></a></td>	
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</form>
	</c:when>
	<c:otherwise>
		<table width="100%" border="1" cellspacing="0" cellpadding="5">
		<tr bgcolor="#666666">
			<td class="bgColorMain"><strong><font color="#FFFFFF">No
						Order Detail in List! Press <a style="color: red" href="UserDetail.do">here</a>
						to back manage account!
				</font></strong></td>
		</tr>
	</table>
	</c:otherwise>
</c:choose>